<script type="text/javascript" src="/static/javascript/datetimepicker_css.js"></script>
<script type="text/javascript" src="/static/swfupload/swfupload.js"></script>
<script type="text/javascript" src="/static/javascript/upload.js"></script>
<!--{literal}-->
<script type="text/javascript">
	UEDITOR_HOME_URL = "/editor/";
	textarea = "intro";
</script>
<!--{/literal}-->
<script type="text/javascript" src="/editor/editor_config.js"></script>
<script type="text/javascript" src="/editor/editor_all.js"></script>
<link rel="stylesheet" type="text/css" href="/editor/themes/default/ueditor.css" />
<!--{literal}-->
<script type="text/javascript">
	$(document).ready(function() {
		place_holder = $('#cost_placeholder');
		var editor = new UE.ui.Editor();
		editor.render("textedit");
		editor.ready(function() {
			//editor.setContent("");
		});
		$('#bn_pub').click(function() {
			if (editor.hasContents()) {
				editor.sync();
			}
			$('#form_pub_activity')[0].submit();
		});
	});
	var isShow = false;
	var isNoCharge = false;
	var maleCost = 0;
	var femaleCost = 0;
	on_consume_type_change = function(type) {
		switch (type) {
		case 0:
			place_holder.html("");
			break;
		case 1:
		case 2:
		case 3:
			place_holder.html("");
			if (type == 1) {
				place_holder.append("人均");
			} else if (type == 2) {
				place_holder.append("男");
			} else if (type == 3) {
				place_holder.append("女");
			}
			var input = document.createElement('input');
			input.setAttribute('type', 'text');
			input.setAttribute('name', 'cost')
			input.setAttribute('value', type);
			place_holder.append(input);
			break;
		case 4:
			place_holder.html("");
			var input = document.createElement('input');
			input.setAttribute('type', 'text');
			input.setAttribute('name', 'male_cost');
			input.setAttribute('value', type);
			place_holder.append("男");
			place_holder.append(input);
			var input = document.createElement('input');
			input.setAttribute('type', 'text');
			input.setAttribute('name', 'female_cost');
			input.setAttribute('value', type);
			place_holder.append("女");
			place_holder.append(input);
		}
	};
	var swfu;
	window.onload = function() {
		var settings = {
			upload_url : "/activity/imageUpload",
			flash_url : "/static/swfupload/swfupload.swf",
			file_size_limit : "20480",
			button_image_url : "/static/images/default/upload-button.png",
			button_placeholder_id : "pop_pic",
			button_width : 84,
			button_height : 32,
			file_upload_limit: 10,
			file_dialog_complete_handler : fileDialogComplete,
			upload_success_handler : uploadSuccess
		};
		swfu = new SWFUpload(settings);
	}
</script>
<!--{/literal}-->